﻿using System;

class CalculateWithAccuracy
{
    static void Main()
    {
        Console.WriteLine("Calculates sum ( with accuracy of 0.001)");
        double sum = 0.0;
        double x;
        int divider = 2;

        do
        {
            x = 1.0 / divider;
            sum += x;
            Console.WriteLine("+");
            Console.WriteLine("1/{0}", divider++);

        } while (x > 0.001);
        Console.WriteLine("\nSum = {0:f4}", sum);
    }
}

